Ext.define('Seq.grid.CrossTable', {
	        extend : 'Seq.grid.Panel',

	        config : {
		        url : null
	        },

	        refreshData : function() {
		        var me = this, url = me.getUrl();
		        Seq.Ajax.request({
			                url : Ext.isString(url) ? url : url.url,
			                params : Ext.isString(url) ? {} : url.params,
			                fnSuccess : function(options, result) {
				                var data = result.data, store = me.getStore();
				                if (store) {
					                store.removeAll(true);
				                }
				                store = me.createStore(store);
				                me.beforeReconfigure && me.beforeReconfigure(data);
				                me.reconfigure(store, data.columns);
				                store.loadData(data.data);
				                store.commitChanges();
			                }
		                });
	        },

	        updateUrl : function(value) {
		        var me = this;
		        me.setUrl(value);
		        me.refreshData();
	        },

	        createStore : function(data) {
		        var fields = Ext.isEmpty(data.fields) ? [] : data.fields;
		        return Ext.create('Ext.data.Store', {
			                model : Ext.create('Seq.model.KeyName', {
				                        fields : fields
			                        })
		                });
	        }
        });